<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'mobile-phone-form',
	'enableAjaxValidation'=>false,
	'htmlOptions' => array('enctype'=>'multipart/form-data'),
)); ?>


	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'moep_type'); ?>
		<?php 
			$typeMap = array(0=>'无',
							 1=>'直板',
							 2=>'翻盖',
							 3=>'滑盖',
							);
		?>
		<select name="MobilePhone[moep_type]">
			<?php for($i=0; $i<4; $i++){?>
			<option value="<?php echo $i; ?>" <?php if($model->moep_type == $i){echo 'selected';} ?> ><?php echo $typeMap[$i]; ?></option>
			<?php } ?>
		</select>
		<?php echo $form->error($model,'moep_type'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'moep_hot_sale'); ?>
		<?php 
			$typeMap = array(0=>'不是',
							 1=>'是',
							);
		?>
		<select name="MobilePhone[moep_hot_sale]">
			<?php for($i=0; $i<2; $i++){?>
			<option value="<?php echo $i; ?>" <?php if($model->moep_hot_sale == $i){echo 'selected';} ?> ><?php echo $typeMap[$i]; ?></option>
			<?php } ?>
		</select>
		<?php echo $form->error($model,'moep_hot_sale'); ?>
	</div>

	<div class="row">
		<?php
			echo $form->labelEx($model,'moeb_id');
			$brandList = $this->getBrandList();
		?>
		<select name="MobilePhone[moeb_id]">
			<option value="0"  >其他</option>
			<?php foreach($brandList as $key=>$val){?>
			<option value="<?php echo $val['moeb_id']; ?>" <?php if($model->moeb_id == $val['moeb_id']){echo 'selected';} ?> ><?php echo $val['moeb_name']; ?></option>
			<?php } ?>
		</select>
		<?php echo $form->error($model,'moeb_id'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'moep_price'); ?>
		<?php echo $form->textField($model,'moep_price'); ?>
		<?php echo $form->error($model,'moep_price'); ?>
	</div>
<!--
	<div class="row">
		<?php echo $form->labelEx($model,'moep_vote_num'); ?>
		<?php echo $form->textField($model,'moep_vote_num'); ?>
		<?php echo $form->error($model,'moep_vote_num'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'moep_vote_score'); ?>
		<?php echo $form->textField($model,'moep_vote_score'); ?>
		<?php echo $form->error($model,'moep_vote_score'); ?>
	</div>
-->
	<div class="row">
		<?php echo $form->labelEx($model,'moep_log'); ?>
		<?php 
			echo $form->textField($model,'moep_log',array('size'=>60,'maxlength'=>100)); 
			echo "<br/>";
			echo CHtml::fileField('phone_logo', '', array());
		?>
		<?php echo $form->error($model,'moep_log'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'moep_name'); ?>
		<?php echo $form->textField($model,'moep_name',array('size'=>50,'maxlength'=>50)); ?>
		<?php echo $form->error($model,'moep_name'); ?>
	</div>
	<div class="row">
		<?php echo $form->labelEx($model,'moep_desc'); ?>
		<?php echo $form->textField($model,'moep_desc',array('size'=>50,'maxlength'=>250)); ?>
		<?php echo $form->error($model,'moep_desc'); ?>
	</div>
	<div class="row">
		<?php echo $form->labelEx($model,'moep_os'); ?>
		<?php echo $form->textField($model,'moep_os',array('size'=>32,'maxlength'=>32)); ?>
		<?php echo $form->error($model,'moep_os'); ?>
	</div>
	

	<div class="row">
		<?php echo $form->labelEx($model,'moep_screen_size'); ?>
		<?php echo $form->textField($model,'moep_screen_size'); ?>
		<?php echo $form->error($model,'moep_screen_size'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'moep_pix_x'); ?>
		<?php echo $form->textField($model,'moep_pix_x'); ?>
		<?php echo $form->error($model,'moep_pix_x'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'moep_pix_y'); ?>
		<?php echo $form->textField($model,'moep_pix_y'); ?>
		<?php echo $form->error($model,'moep_pix_y'); ?>
	</div>
	
	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? '增加' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->